package Io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
//使用对象输入流完成对象的反序列化操作
public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        FileInputStream fis = new FileInputStream("Person.obj");
        ObjectInputStream ois = new ObjectInputStream(fis);  //对象流
        Person o =(Person) ois.readObject();
        System.out.println(o);
        ois.close();
    }
}
